package com.xinghou.platform.server.api.bussiness.impl;

import com.xinghou.platform.dao.main.DataConfigDAO;
import com.xinghou.platform.dao.main.InterestTagsConfigDAO;
import com.xinghou.platform.model.main.DataConfig;
import com.xinghou.platform.model.main.InterestTags;
import com.xinghou.platform.model.main.InterestTagsConfig;
import com.xinghou.platform.server.api.bussiness.InterestTagsConfigService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by qingshengzheng on 16/6/28.
 */
@Service("InterestTagsConfigService")
public class InterestTagsConfigServiceImpl implements InterestTagsConfigService {
    @Resource
    private DataConfigDAO dataConfigDAO;
    @Resource
    private InterestTagsConfigDAO interestTagsConfigDAO;

    @Override
    public InterestTagsConfig getInterestTagsConfigByTag_id(Integer tagId) {
        return interestTagsConfigDAO.getInterestTagsConfigByTag_id(tagId);

    }

    @Override
    public int updateInterestTagsConfig(InterestTagsConfig interestTagsConfig) {
       return interestTagsConfigDAO.updateInterestTagsConfig(interestTagsConfig);
    }

    @Override
    public int saveInterestTagsConfig(InterestTagsConfig interestTagsConfig) {
       return interestTagsConfigDAO.saveInterestTagsConfig(interestTagsConfig);
    }

    @Override
    public List<InterestTagsConfig> getTastInfoList() {
        return  interestTagsConfigDAO.getTastInfoList();
    }

    @Override
    public List<DataConfig> getInterestTags(Integer tagType) {
        return  dataConfigDAO.getDataConfigList(tagType);
    }
}
